#!/usr/bin/zsh

AOUT="./output.asciidoc"
OUT="./output.html"
cat > $AOUT <<END
= Rosetta Code
:numbered:
:toc:

++++
<style>
h2 {
	font-size: 14pt;
}

pre {
	font-family: Fantasque Sans Mono;
	font-weight: bold;
	font-size: 8pt;
}
</style>
++++

END

for f in **/*.cc
do
	echo $f
cat >> $AOUT <<END
== \`$f\`

[source,cpp]
----
`cat $f`
----

END
done

#cat $AOUT
asciidoc $AOUT > $OUT
xdg-open $OUT

